package com.lh.common.entity.admin;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lh.common.enums.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
 * ovmal_order:订单表
 * @author Administrator 2020-05-09
 */
@TableName("ovmal_order")
@Alias("order")
@Data
public class Order implements Serializable {
    @ApiModelProperty(value = "订单id")
    @TableField(value = "oid")
    @TableId
    private Long oid;

    @ApiModelProperty(value = "订单号")
    @Column(name = "order_item")
    private String orderItem;

    @ApiModelProperty(value = "订单类型  ONEDOLLARRUSH:一元抢购  ORDINARYSHOP:普通商品")
    @Column(name = "order_type")
    private OrderTypeEnum orderType;

    @ApiModelProperty(value = "订单状态   TOPAY:待付款; INPAY:支付中; TOSHIP:待发货; OUTSTOCK:已出库; SHIPED:已发货; COMPLETED:已完成;  CANCELLED:已取消")
    @Column(name = "order_status")
    private OrderStatusEnum orderStatus;

    @ApiModelProperty(value = "用户ID")
    @Column(name = "user_id")
    private Long userId;

    @ApiModelProperty(value = "一元夺宝活动AID")
    @Column(name = "aid")
    private Long aid;

    @ApiModelProperty(value = "一元夺宝活动购买次数")
    @Column(name = "shop_num")
    private Integer shopNum;

    @ApiModelProperty(value = "期数表pid")
    @Column(name = "period_id")
    private Long periodId;

    @ApiModelProperty(value = "运费总额")
    @Column(name = "freight")
    private BigDecimal freight;

    @ApiModelProperty(value = "商品总额")
    @Column(name = "should_price")
    private BigDecimal shouldPrice;

    @ApiModelProperty(value = "实付款总额")
    @Column(name = "pay_price")
    private BigDecimal payPrice;

    @ApiModelProperty(value = "收件人")
    @Column(name = "receive_recipients")
    private String receiveRecipients;

    @ApiModelProperty(value = "收件人手机号")
    @Column(name = "receive_phone")
    private String receivePhone;

    @ApiModelProperty(value = "支付方式")
    @Column(name = "pay_type")
    private PayType payType;

    @ApiModelProperty(value = "支付时间")
    @Column(name = "pay_time")
    private Date payTime;

    @ApiModelProperty(value = "支付回调时间")
    @Column(name = "pay_call_back_time")
    private Date payCallBackTime;

    @ApiModelProperty(value = "支付方订单号")
    @Column(name = "pay_order_number")
    private String payOrderNumber;

    @ApiModelProperty(value = "支付方支付ID")
    @Column(name = "pay_payments_id")
    private String payPaymentsId;

    @ApiModelProperty(value = "订单退款时间")
    @Column(name = "refund_apply_time")
    private Date refundApplyTime;

    @ApiModelProperty(value = "快递公司")
    @Column(name = "express_name")
    private String expressName;

    @ApiModelProperty(value = "物流单号")
    @Column(name = "express_code")
    private String expressCode;

    @ApiModelProperty(value = "")
    @Column(name = "create_time")
    private Date createTime;

    @ApiModelProperty(value = "")
    @Column(name = "update_time")
    private Date updateTime;

    @ApiModelProperty(value = "")
    @Column(name = "is_del")
    private IsDel isDel;

    @ApiModelProperty(value = "区域")
    @Column(name = "region")
    private String region;

    @ApiModelProperty(value = "城市")
    @Column(name = "city")
    private String city;

    @ApiModelProperty(value = "详细地址")
    @Column(name = "detailed")
    private String detailed;

    @ApiModelProperty(value = "邮编")
    @Column(name = "postal_code")
    private String postalCode;

    @ApiModelProperty(value = "签收完成时间")
    @Column(name = "sign_time")
    private Date signTime;

    @ApiModelProperty(value = "是否售后：NONE:无售后，REFUND：退款，AFTERSALE：售后")
    @Column(name = "after_sale_type")
    private AfterSaleOrderTypeEnum afterSaleType;

    @ApiModelProperty(value = "发货时间")
    @Column(name = "delivery_time")
    private Date deliveryTime;

    /**
     * ovmal_order
     */
    private static final long serialVersionUID = 1L;
}
